import {get,post} from '../../utils/request'
// 考试列表
const TestList = (params:any)=>{
    return get('test/list',params)
}
// 考试删除
const TestDel = (id:number)=>{
    return get('test/delete',{id})
}
// 考试批删
const TestDels = (ids:any)=>{
    return post('test/deleteall',{ids})
}
// 修改发布状态
const TestState = (data:any)=>{
    return post('test/updateState',data)
}
// 获取部门列表
const Department = ()=>{
    return get('department/list')
}
// 获取班级列表
const Classes = (depid:any)=>{
    return get('classes/list',{depid})
}
// 获取学生列表
const Student = (params:any)=>{
    return get('student/list',params)
}
// 获取老师列表
const Teacher=(depid:string)=>{
    return get('teacher/list',{depid})
}
// 获取单挑试卷列表
const Subjects=(id:any)=>{
    return get('subjects/get',{id})
}
// 获取题库列表
const Database=(params:any)=>{
    return get('database/list',params)
}
// 获取试卷列表
const SubjectsList=(params:any)=>{
    return get('subjects/list',params)
}
// 题库添加
const Databasequestion=(params:any)=>{
    return post('database/add',params)
}
// 获取考试阅卷老师
const Getmarkteachers=(params:any)=>{
    return get('test/getmarkteachers',params)
}
// 获取可见范围
const Getlimit=(params:any)=>{
    return get('test/getlimit',{params})
}
// 考试添加
const Add =(params:any)=>{
    return post('test/add',params)
}
// 根据题库id获取试题列表
const QuestionList =(databaseid:any)=>{
    return get('databasequestion/list',{databaseid})
}
// 根据id获取单个考试信息
const getTest = (id:any)=>{
    return get('test/get',{id})
}
// 获取考试分析统计
const testList = (data:any)=>{
    return get('test/analyse',data)
}
// 获取考试学生列表
const studentList = (data:any)=>{
    return get('student/test',data)
}
// 获取学生考试结果
const getForResult = (data:any)=>{
    return get('test/getForResult',data)
}
// 文件上传接口
const Upload = (file:any)=>{
    return post('test/upload',file)
}
export {
    TestList,
    TestDel,
    TestDels,
    TestState,
    Department,
    Classes,
    Student,
    Teacher,
    Database,
    SubjectsList,
    Databasequestion,
    Getmarkteachers,
    Getlimit,
    Add,
    QuestionList,
    getTest,
    testList,
    studentList,
    getForResult,
    Subjects,
    Upload
}